﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="NguoiDung.aspx.cs" Inherits="Admin_HeThong_NguoiDung" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../css/datepicker/datepicker3.css" rel="stylesheet" type="text/css" />
    <script src="../js/plugins/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
    <script src="../js/plugins/datepicker/locales/bootstrap-datepicker.vi.js"type="text/javascript"></script>
    <script src="../js/function.js" type="text/javascript"></script>
    <script src="QuanLy.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <h2 class="head-title">
        Người dùng
    </h2>
    <p>
        <a href="javascript:void()" id="fthem" class="btn btn-primary">
            <i class="fa fa-plus"></i> Thêm người dùng</a> 
        <a href="javascript:void()" id="timkiem" class="btn btn-success">
            <i class="fa fa-search"></i> Tìm kiếm</a> 
    </p>
    <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
    <div class="box">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="boxsearch" style="display:none">
                <asp:TextBox ID="stxtEmail" ClientIDMode="Static" runat="server"></asp:TextBox>
                <asp:TextBox ID="stxtHoTen" ClientIDMode="Static" runat="server"></asp:TextBox>
                <asp:TextBox ID="stxtDienThoai" ClientIDMode="Static" runat="server"></asp:TextBox>
            </div>
            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"></asp:LinkButton>
            <asp:GridView ID="DataGrid" runat="server" AllowPaging="True" 
                CssClass="table table-bordered table-hover dataTable"
                AutoGenerateColumns="False" PageSize="20" Width="100%" 
                onrowdatabound="DataGrid_RowDataBound">
                <Columns>
                    <asp:BoundField DataField="Email" HeaderText="Email" />
                    <asp:BoundField DataField="HoTen" HeaderText="Họ Tên">
                    </asp:BoundField>
                    <asp:BoundField DataField="SDT" HeaderText="Điện thoại" />
                    <asp:TemplateField HeaderText="Trạng thái">
                        <ItemTemplate>
                            <asp:Literal ID="ltrTrangThai" runat="server"></asp:Literal>                            
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Tác Vụ">
                        <ItemTemplate>
                            <button onclick="return edit('<%#Eval("MaQL") %>')" class="btn btn-default" title="Sửa">
                                <i class="fa fa-pencil-square-o"></i>
                            </button>
                            <button onclick="return showAlert('<%#Eval("MaQL") %>')" class="btn btn-default m-l-3" title="Xóa">
                                <i class="fa fa-trash-o"></i>
                            </button>
                            <button onclick="return showChangePass('<%#Eval("Email") %>',<%#Eval("MaQL") %>)" class="btn btn-default" title="Sửa">
                                <i class="fa fa-key"></i>
                            </button>
                        </ItemTemplate>
                        <ItemStyle CssClass="item_center" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="pagerstyle" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
    </div>

    <div id="edit-content" class="edit-box" title="Thêm người dùng" style="display: none;">
        <input name="txtID" type="hidden" id="txtID" />
        <div class="form-group">
            <label>Email</label>
            <input class="form-control" name="txtEmail" type="text" id="txtEmail" placeholder="Email" />
        </div>
        <div class="form-group">
            <label>Họ tên</label>
            <input class="form-control" name="txtHoTen" type="text" id="txtHoTen" placeholder="Họ tên"/>
        </div>
        <div class="form-group">
            <label>Điện Thoại</label>
            <input class="form-control" name="txtDienThoai" type="text" id="txtDienThoai" placeholder="Điện thoại"/>
        </div>
        <div class="form-group">
            <label>Trạng thái</label>
            <select class="form-control" name="txtTrangThai" id="txtTrangThai">
              <option value="0">Khóa</option>
              <option value="1">Hoạt động</option>
            </select>
        </div>
    </div>

    <div id="ftimkiem" title="Tìm kiếm" style="display: none">
        <div class="form-group">
            <label>Email</label>
            <input class="form-control" name="txtEmail" type="text" id="sEmail" placeholder="Email" />
        </div>
        <div class="form-group">
            <label>Họ tên</label>
            <input class="form-control" name="txtHoTen" type="text" id="sHoTen" placeholder="Họ tên"/>
        </div>
        <div class="form-group">
            <label>Điện Thoại</label>
            <input class="form-control" name="txtDienThoai" type="text" id="sDienThoai" placeholder="Điện thoại"/>
        </div>
    </div>

    <div id="fdoimatkhau" title="Đổi mật khẩu" style="display: none">
        <input name="txtcID" type="hidden" id="txtcID" />
        <div class="form-group">
            <label for="txtTenFont">Email</label>
            <input class="form-control" name="txtEmail" type="text" readonly>
        </div>
        <div class="form-group">
            <label for="txtTenFont">Mật khẩu</label>
            <input class="form-control" name="txtTenLoai" type="password" id="txtpassword">
        </div>
        <div class="form-group">
            <label for="txtTenFont">Nhập lại</label>
            <input class="form-control" name="txtTenLoai" type="password" id="txtrpassword">
        </div>
    </div>
</asp:Content>

